function _rasterDataBlock(wid,hei,numbands,f64arr,geotrans,srs){
	let res={};
	res.wid = wid;
	res.hei = hei;
	res.asize=wid*hei;
	res.numbands=numbands;
	res.geotrans=geotrans;
	res.srs=srs;
	res.data = f64arr;
	res.getAllSize = function() { return this.asize; }
	res.getGeoTrans = function() { return this.geotrans; }
	res.getSRS = function() { return this.srs;}
	res.getPixel = function(ip){ 
		let arr=new Float64Array(this.numbands);
		let offset=ip*this.numbands ;
		for(let ib=0;ib<this.numbands;++ib)arr[ib]=this.data[offset+ib];
		return arr
	}
	return res ;
}
function _run(rdb) { // rdb : rasterDataBlock
	let result = { state:0 , error : "" , data : null }; // state 0 is ok, others are bad.
	let asize = rdb.getAllSize() ;
	let trans = rdb.getGeoTrans();// [x0, dx, 0, y0, 0, dy] for the block
	let srs = rdb.getSRS();// '.....' get wkt string of projection
	if (typeof(forEachPixel) !== "undefined") {
		let outData = new Float64Array(asize);
		for (let i = 0; i < asize; ++i) {
			let valArr = rdb.getPixel(i);// [band1,band2,...] get multi bands of data in double 
			let out1 = forEachPixel(valArr);
			outData[i] = out1;
		}
		result["data"] = outData;
		return result;
	}
	else {
		result.state = 1;
		result.error = "Undefined forEachPixel function.";
		return result;
	}
}